package com.project.dao;

import com.project.entity.PositionType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/26 12:51
 * @param:
 * @return:
 */
public interface PositionTypeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PositionType record);

    int insertSelective(PositionType record);

    PositionType selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PositionType record);

    int updateByPrimaryKey(PositionType record);

    /**
     * author: WheelChen
     * date: 2017/8/2
     * function: 查找所有岗位
     *
     * @param
     * @return
     */
    List<PositionType> selectAll();

    List<PositionType> selectBatchBySchoolId(Integer schoolId);

    /**
     * author: WheelChen
     * date: 2017/8/9
     * function: [条件]查找岗位类别
     *
     * @param positionType
     * @return
     */
    List<PositionType> selectBatchByCondition(PositionType positionType);

    /**
     * author: WheelChen
     * date: 2017/10/16
     * function: 查下相同学院下是否有相同名称的岗位类别
     *
     * @param typename 岗位类别名称
     * @param schoolid 学院id
     * @return
     */
    int checkTypeNameAndSchoolidIsExist(@Param("typename") String typename, @Param("schoolid") Integer schoolid);
}
